#include "D5XProtocol.h"

const std::string D5XNodeCmds::reset = "reset";
const std::string D5XNodeCmds::start = "start";
const std::string D5XNodeCmds::stop = "stop";
const std::string D5XNodeCmds::heartbeat = "heartbeat";
const std::string D5XNodeCmds::algo_result = "algo_result";
const std::string D5XNodeCmds::grab_result = "grab_result";
const std::string D5XNodeCmds::work_mode = "work_mode";
const std::string D5XNodeCmds::ask_dimen1_result = "ask_dimen1_result";
const std::string D5XNodeCmds::pickcheck_result = "pickcheck_result";
const std::string D5XNodeCmds::final_result = "final_result";

const std::string D5XNodeCmds::image_data = "image_data";
const std::string D5XNodeCmds::db_operation = "db_operation";
const std::string D5XNodeCmds::popup_message = "popup_message";

const std::string D5XNodeCmds::plc_control = "plc_control";
const std::string D5XNodeCmds::encoder_pos = "encoder_pos";
const std::string D5XNodeCmds::plc_step = "plc_step";

std::string GetDeviceNameByPLCCmd(ED5XPLCCmdCodes cmd)
{
	switch (cmd)
	{
	case ED5XPLCCmdCodes::Cam_1_Photo: return "cam1";
	case ED5XPLCCmdCodes::Cam_2_Photo: return "cam2";
	case ED5XPLCCmdCodes::Cam_3_Photo:return "cam3";
	case ED5XPLCCmdCodes::Cam_4_Photo:return "cam4";
	case ED5XPLCCmdCodes::Cam_5_Photo:return "cam5";
	case ED5XPLCCmdCodes::Cam_6_Photo:return "cam6";
	case ED5XPLCCmdCodes::Cam_7_Photo:return "cam7";
	case ED5XPLCCmdCodes::Cam_8_Photo:return "cam8";
	case ED5XPLCCmdCodes::Cam_9_Photo:return "cam9";
	case ED5XPLCCmdCodes::Cam_10_Photo:return "cam10";
	case ED5XPLCCmdCodes::Cam_11_Photo:return "cam11";
	case ED5XPLCCmdCodes::Cam_12_Photo:return "cam12";
	case ED5XPLCCmdCodes::StartLine_1_2:return "line1_2";
	case ED5XPLCCmdCodes::StartLine_3_4:return "line3_4";
	case ED5XPLCCmdCodes::StartLine_5_8:return "line_5_8";
	default:
		return "unknown";
		break;
	}
}